/* Copyright (c) 2008 Google Inc.
*  Copyright (c) 2009 Pierre Henri Kuate.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System.Collections.Generic;
using System;

namespace org.opensocial.data
{
    /// <summary> Class representing the Activity object which is used in the REST calls
    /// for fetching and creating activities
    /// </summary>
    /// <author>  vijayam
    /// </author>
    public class Activity : OpenSocialObject
    {
        public string AppId
        {
            get { return getStringValue("appId"); }
        }

        public string Body
        {
            get { return getStringValue("body"); }
        }

        public string BodyId
        {
            get { return getStringValue("bodyId"); }
        }

        public string ExternalId
        {
            get { return getStringValue("externalId"); }
        }

        /// <summary> Retrieves the OpenSocial ID associated with the instance. Returns an
        /// empty string if no ID has been set.
        /// </summary>
        public string Id
        {
            get { return getStringValue("id"); }
        }

        public IList<string> MediaItems
        {
            get { return getStringValues("mediaItems"); }
            set { setValue("mediaItems", value); }
        }

        public DateTime? PostedTime
        {
            get { return getDateTimeValue("postedTime"); }
        }

        public double? Priority
        {
            get { return getDoubleValue("priority"); }
        }

        public string StreamFaviconUrl
        {
            get { return getStringValue("streamFaviconUrl"); }
        }

        public string StreamSourceUrl
        {
            get { return getStringValue("streamSourceUrl"); }
        }

        public string StreamTitle
        {
            get { return getStringValue("streamTitle"); }
        }

        public string StreamUrl
        {
            get { return getStringValue("streamUrl"); }
        }

        public Dictionary<string, string> TemplateParameters
        {
            get { return getStringDictionaryValues("templateParameters"); }
            set { setValue("templateParameters", value); }
        }

        public string Title
        {
            get { return getStringValue("title"); }
        }

        public string TitleId
        {
            get { return getStringValue("titleId"); }
            set { setValue("titleId", value); }
        }
        public string Url
        {
            get { return getStringValue("url"); }
        }

        public string UserId
        {
            get { return getStringValue("userId"); }
        }
    }
}